package cn.wolfcode.wolf2w.web.controller;

import cn.wolfcode.wolf2w.uitl.UploadUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

/**
 * 放添加图片的地方,返回是一个路径
 */
@Controller
public class UploadImgcontroller {
    @RequestMapping("/coverImageUpload")
    @ResponseBody
    public Object coverImageUpload(MultipartFile pic) throws Exception {//传入请求文件接收的类
        //定义一个空的字符串
        String url= UploadUtil.uploadAli(pic);
        return url;
    }

}
